package com.hc.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 操作历史
 *
 * @author 梁云亮
 */
@ApiModel(value = "Domain:OpLog")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "tb_op_log")
public class OpLog implements Serializable {
    private static final long serialVersionUID = -6528573481946058056L;
    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键id")
    private Integer id;

    /**
     * 用户id
     */
    @TableField(value = "user_id")
    @ApiModelProperty(value = "用户id")
    private Integer userId;

    /**
     * 操作时间
     */
    @TableField(value = "op_time")
    @ApiModelProperty(value = "操作时间")
    private LocalDateTime opTime;

    /**
     * 操作类型
     */
    @TableField(value = "op_type")
    @ApiModelProperty(value = "操作类型")
    private String opType;

    /**
     * 操作url
     */
    @TableField(value = "op_url")
    @ApiModelProperty(value = "操作url")
    private String opUrl;

    /**
     * 请求参数
     */
    @TableField(value = "params")
    @ApiModelProperty(value = "请求参数")
    private String params;

    /**
     * 备注
     */
    @TableField(value = "desc")
    @ApiModelProperty(value = "备注")
    private String desc;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    /**
     * 返回数据
     */
    @TableField(value = "res")
    @ApiModelProperty(value = "返回数据")
    private String res;

}
